<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <meta name="generator" content="VuePress 2.0.0-beta.60">
    <script>
      (function() {
        const userMode = localStorage.getItem('vuepress-reco-color-scheme') || 'auto';
        const systemDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;

        if (userMode === 'dark' || (userMode === 'auto' && systemDarkMode)) {
          document.documentElement.classList.toggle('dark', true);
        }
      })();
    </script>
    <title>Bat 批处理脚本 | 阿派 | Apai Blog</title><meta name="description" content="Just playing around">
    <link rel="modulepreload" href="/assets/app-8a43a0f0.js"><link rel="modulepreload" href="/assets/framework-e1bed10d.js"><link rel="modulepreload" href="/assets/BatJiaoBen.html-20ec59d7.js"><link rel="modulepreload" href="/assets/BatJiaoBen.html-d2d2666a.js"><link rel="prefetch" href="/assets/index.html-ef2f4f01.js" as="script"><link rel="prefetch" href="/assets/index.html-1013d654.js" as="script"><link rel="prefetch" href="/assets/index.html-a146dedc.js" as="script"><link rel="prefetch" href="/assets/index.html-f4b2eaea.js" as="script"><link rel="prefetch" href="/assets/index.html-e3ed352e.js" as="script"><link rel="prefetch" href="/assets/index.html-42ce2ab9.js" as="script"><link rel="prefetch" href="/assets/index.html-ec24ec9e.js" as="script"><link rel="prefetch" href="/assets/index.html-d3d8d7ce.js" as="script"><link rel="prefetch" href="/assets/index.html-9faf073b.js" as="script"><link rel="prefetch" href="/assets/index.html-9364b7dd.js" as="script"><link rel="prefetch" href="/assets/index.html-fc0fb462.js" as="script"><link rel="prefetch" href="/assets/index.html-603c6c19.js" as="script"><link rel="prefetch" href="/assets/index.html-0349deb8.js" as="script"><link rel="prefetch" href="/assets/index.html-09405a87.js" as="script"><link rel="prefetch" href="/assets/index.html-91577c59.js" as="script"><link rel="prefetch" href="/assets/index.html-552ae255.js" as="script"><link rel="prefetch" href="/assets/index.html-424369c4.js" as="script"><link rel="prefetch" href="/assets/index.html-1dfc0069.js" as="script"><link rel="prefetch" href="/assets/index.html-ec62f595.js" as="script"><link rel="prefetch" href="/assets/index.html-4621ef22.js" as="script"><link rel="prefetch" href="/assets/index.html-e189ec13.js" as="script"><link rel="prefetch" href="/assets/index.html-b424a45b.js" as="script"><link rel="prefetch" href="/assets/index.html-623952a8.js" as="script"><link rel="prefetch" href="/assets/index.html-cedcb7c8.js" as="script"><link rel="prefetch" href="/assets/index.html-07f61d2f.js" as="script"><link rel="prefetch" href="/assets/index.html-9ef01f1e.js" as="script"><link rel="prefetch" href="/assets/index.html-dfa6d19f.js" as="script"><link rel="prefetch" href="/assets/index.html-23dd0955.js" as="script"><link rel="prefetch" href="/assets/index.html-1e7a4ff3.js" as="script"><link rel="prefetch" href="/assets/index.html-e12f154a.js" as="script"><link rel="prefetch" href="/assets/index.html-30de2d02.js" as="script"><link rel="prefetch" href="/assets/index.html-6a244983.js" as="script"><link rel="prefetch" href="/assets/index.html-8900b10e.js" as="script"><link rel="prefetch" href="/assets/index.html-b3210461.js" as="script"><link rel="prefetch" href="/assets/biaoqian-fenlei-moban.html-2db9524d.js" as="script"><link rel="prefetch" href="/assets/MuBan-Apai.html-5af383c8.js" as="script"><link rel="prefetch" href="/assets/guide.html-5aaed80e.js" as="script"><link rel="prefetch" href="/assets/Lu-aboutMe.html-82ee5401.js" as="script"><link rel="prefetch" href="/assets/kaishi.html-9d8493a0.js" as="script"><link rel="prefetch" href="/assets/Hobby-SheYing.html-3ac28a1b.js" as="script"><link rel="prefetch" href="/assets/Lu-aboutMe.html-96d10c31.js" as="script"><link rel="prefetch" href="/assets/Work-MaYun.html-5e497e8c.js" as="script"><link rel="prefetch" href="/assets/Java-basics.html-4a44925e.js" as="script"><link rel="prefetch" href="/assets/JavaAPI.html-ae8a1843.js" as="script"><link rel="prefetch" href="/assets/JavaBiKeng04.html-c9e75b16.js" as="script"><link rel="prefetch" href="/assets/JavaGongNeng03.html-6ca97faf.js" as="script"><link rel="prefetch" href="/assets/JavaJinJie02.html-eaabb81d.js" as="script"><link rel="prefetch" href="/assets/JavaMyUtil.html-e2cff404.js" as="script"><link rel="prefetch" href="/assets/MyBatisPlus.html-b608a85b.js" as="script"><link rel="prefetch" href="/assets/MySql.html-4bcdc408.js" as="script"><link rel="prefetch" href="/assets/MySqlFunction.html-23affe6f.js" as="script"><link rel="prefetch" href="/assets/RabbitMQ.html-2cc19b22.js" as="script"><link rel="prefetch" href="/assets/Redis.html-f7a014e9.js" as="script"><link rel="prefetch" href="/assets/ShiWuAffair.html-33f5c0c4.js" as="script"><link rel="prefetch" href="/assets/Spring.html-628746d6.js" as="script"><link rel="prefetch" href="/assets/SpringConfig.html-49f3c621.js" as="script"><link rel="prefetch" href="/assets/SpringPeiZhi.html-ac6df88a.js" as="script"><link rel="prefetch" href="/assets/SpringSecurity.html-057633f1.js" as="script"><link rel="prefetch" href="/assets/WebSocket.html-57d6fc97.js" as="script"><link rel="prefetch" href="/assets/DockerCompose.html-98ad6b52.js" as="script"><link rel="prefetch" href="/assets/Linux.html-43351365.js" as="script"><link rel="prefetch" href="/assets/Nginx.html-f1276de6.js" as="script"><link rel="prefetch" href="/assets/RabbitMQ_COPY.html-5cdb6370.js" as="script"><link rel="prefetch" href="/assets/Redis_COPY.html-486e1d26.js" as="script"><link rel="prefetch" href="/assets/Redis_CRUD.html-47e0af0f.js" as="script"><link rel="prefetch" href="/assets/DmShengChen.html-bb069d8e.js" as="script"><link rel="prefetch" href="/assets/EasyExcel.html-b1eb613d.js" as="script"><link rel="prefetch" href="/assets/GitLu.html-eae89aa5.js" as="script"><link rel="prefetch" href="/assets/JavaKaiFa.html-4fbb86cc.js" as="script"><link rel="prefetch" href="/assets/JSR303.html-b976b418.js" as="script"><link rel="prefetch" href="/assets/MinIO.html-5e3d4702.js" as="script"><link rel="prefetch" href="/assets/ShardingJDBC.html-d0f811b3.js" as="script"><link rel="prefetch" href="/assets/Swagger.html-bb111a21.js" as="script"><link rel="prefetch" href="/assets/Vuepress.html-994cf672.js" as="script"><link rel="prefetch" href="/assets/Angular.html-3115afab.js" as="script"><link rel="prefetch" href="/assets/ElementUI.html-35bc6477.js" as="script"><link rel="prefetch" href="/assets/Html-Js.html-015f1806.js" as="script"><link rel="prefetch" href="/assets/Vue-basics.html-a64846f4.js" as="script"><link rel="prefetch" href="/assets/Vue3_group.html-f53be77f.js" as="script"><link rel="prefetch" href="/assets/Vue3_option.html-19f76b9e.js" as="script"><link rel="prefetch" href="/assets/ApifoxAPIceshi.html-19cd8153.js" as="script"><link rel="prefetch" href="/assets/PDManeryuanshujianmo.html-f6fa9d9e.js" as="script"><link rel="prefetch" href="/assets/OCRwenzishibie.html-11fc474d.js" as="script"><link rel="prefetch" href="/assets/EasyExcelbiaogeku.html-30777927.js" as="script"><link rel="prefetch" href="/assets/Javadaimashengchengqi.html-cf566ce0.js" as="script"><link rel="prefetch" href="/assets/JDKshuangbanben.html-1f259d3b.js" as="script"><link rel="prefetch" href="/assets/JSR303canshuxiaoyan.html-78322130.js" as="script"><link rel="prefetch" href="/assets/Mail  youjian.html-7e3a0f69.js" as="script"><link rel="prefetch" href="/assets/MyBatisPlusxiangjie.html-0168c152.js" as="script"><link rel="prefetch" href="/assets/MySQLzhucongfuzhi.html-7a4739e8.js" as="script"><link rel="prefetch" href="/assets/Redis-API.html-f488940c.js" as="script"><link rel="prefetch" href="/assets/SpringBootshiwu.html-c07a3864.js" as="script"><link rel="prefetch" href="/assets/SpringBootduxiefenli.html-f0993780.js" as="script"><link rel="prefetch" href="/assets/Springguolvqihelanjieqi.html-78feb321.js" as="script"><link rel="prefetch" href="/assets/WebSocket.html-caecf367.js" as="script"><link rel="prefetch" href="/assets/quanjuyichang-JSR303.html-add01eff.js" as="script"><link rel="prefetch" href="/assets/Docker.html-14746447.js" as="script"><link rel="prefetch" href="/assets/Dockeryuanchengfangwenbushu.html-7dc4f8d3.js" as="script"><link rel="prefetch" href="/assets/Nginxfanxiangdaili.html-42533685.js" as="script"><link rel="prefetch" href="/assets/Apai-SheYingOne.html-143bc574.js" as="script"><link rel="prefetch" href="/assets/Apai-Year.html-b713587f.js" as="script"><link rel="prefetch" href="/assets/My2305.html-b224c5e2.js" as="script"><link rel="prefetch" href="/assets/My2306.html-94838726.js" as="script"><link rel="prefetch" href="/assets/My2307.html-df2118c4.js" as="script"><link rel="prefetch" href="/assets/My2308.html-396c79bc.js" as="script"><link rel="prefetch" href="/assets/My2309.html-1ebdc4bb.js" as="script"><link rel="prefetch" href="/assets/My2310.html-d4ffbd04.js" as="script"><link rel="prefetch" href="/assets/My2311.html-30f23133.js" as="script"><link rel="prefetch" href="/assets/My2312.html-2da62191.js" as="script"><link rel="prefetch" href="/assets/Yi-HuBei.html-90d02bf7.js" as="script"><link rel="prefetch" href="/assets/Yi-ZhuHai.html-e202f6fb.js" as="script"><link rel="prefetch" href="/assets/Apache ECharts tubiao.html-6d4a4703.js" as="script"><link rel="prefetch" href="/assets/Vue3 zuheshi API.html-9fe2887f.js" as="script"><link rel="prefetch" href="/assets/Vue3 xuanxiangshi API.html-d584c181.js" as="script"><link rel="prefetch" href="/assets/Vue3-i18n-guojihuachajian.html-16f6e650.js" as="script"><link rel="prefetch" href="/assets/Batpichulijiaoben.html-307223b0.js" as="script"><link rel="prefetch" href="/assets/Gitgongzuoliu.html-fa6e129f.js" as="script"><link rel="prefetch" href="/assets/Typoratuchuang.html-22c57156.js" as="script"><link rel="prefetch" href="/assets/Vuepress.html-df146bdb.js" as="script"><link rel="prefetch" href="/assets/My2401.html-49f6440f.js" as="script"><link rel="prefetch" href="/assets/My2402.html-950d4e85.js" as="script"><link rel="prefetch" href="/assets/shenhai-0509.html-2007281b.js" as="script"><link rel="prefetch" href="/assets/zhuhaixing.html-17db8380.js" as="script"><link rel="prefetch" href="/assets/404.html-f9875e7b.js" as="script"><link rel="prefetch" href="/assets/index.html-40bced6f.js" as="script"><link rel="prefetch" href="/assets/index.html-3c78780e.js" as="script"><link rel="prefetch" href="/assets/index.html-ef51ba1b.js" as="script"><link rel="prefetch" href="/assets/index.html-bdec80a5.js" as="script"><link rel="prefetch" href="/assets/index.html-3b5427f8.js" as="script"><link rel="prefetch" href="/assets/index.html-cbd49540.js" as="script"><link rel="prefetch" href="/assets/index.html-b0b97c81.js" as="script"><link rel="prefetch" href="/assets/index.html-2793d245.js" as="script"><link rel="prefetch" href="/assets/index.html-71d9a5d9.js" as="script"><link rel="prefetch" href="/assets/index.html-4e7d77cd.js" as="script"><link rel="prefetch" href="/assets/index.html-aeace11a.js" as="script"><link rel="prefetch" href="/assets/index.html-c62ed802.js" as="script"><link rel="prefetch" href="/assets/index.html-e640d31f.js" as="script"><link rel="prefetch" href="/assets/index.html-48e1c605.js" as="script"><link rel="prefetch" href="/assets/index.html-385dcb56.js" as="script"><link rel="prefetch" href="/assets/index.html-1bb1a523.js" as="script"><link rel="prefetch" href="/assets/index.html-1ed80e8d.js" as="script"><link rel="prefetch" href="/assets/index.html-2c154a45.js" as="script"><link rel="prefetch" href="/assets/index.html-3e93d436.js" as="script"><link rel="prefetch" href="/assets/index.html-2a93e2c9.js" as="script"><link rel="prefetch" href="/assets/index.html-cff07ba3.js" as="script"><link rel="prefetch" href="/assets/index.html-7ec32a34.js" as="script"><link rel="prefetch" href="/assets/index.html-ddb40108.js" as="script"><link rel="prefetch" href="/assets/index.html-40ab6c4f.js" as="script"><link rel="prefetch" href="/assets/index.html-47e4ee8b.js" as="script"><link rel="prefetch" href="/assets/index.html-c15250e1.js" as="script"><link rel="prefetch" href="/assets/index.html-fb2ea2e4.js" as="script"><link rel="prefetch" href="/assets/index.html-d7e5408a.js" as="script"><link rel="prefetch" href="/assets/index.html-a38055d0.js" as="script"><link rel="prefetch" href="/assets/index.html-be4e50cb.js" as="script"><link rel="prefetch" href="/assets/index.html-660e4bef.js" as="script"><link rel="prefetch" href="/assets/index.html-98aa61ea.js" as="script"><link rel="prefetch" href="/assets/index.html-a6b7472f.js" as="script"><link rel="prefetch" href="/assets/index.html-ab78917a.js" as="script"><link rel="prefetch" href="/assets/biaoqian-fenlei-moban.html-f2c6c309.js" as="script"><link rel="prefetch" href="/assets/MuBan-Apai.html-5714876d.js" as="script"><link rel="prefetch" href="/assets/guide.html-9a89b22b.js" as="script"><link rel="prefetch" href="/assets/Lu-aboutMe.html-f8203e0a.js" as="script"><link rel="prefetch" href="/assets/kaishi.html-4ff9d0f3.js" as="script"><link rel="prefetch" href="/assets/Hobby-SheYing.html-e1ab7a00.js" as="script"><link rel="prefetch" href="/assets/Lu-aboutMe.html-4b735204.js" as="script"><link rel="prefetch" href="/assets/Work-MaYun.html-a185f330.js" as="script"><link rel="prefetch" href="/assets/Java-basics.html-c0d3a063.js" as="script"><link rel="prefetch" href="/assets/JavaAPI.html-f75cbb54.js" as="script"><link rel="prefetch" href="/assets/JavaBiKeng04.html-d2fc755d.js" as="script"><link rel="prefetch" href="/assets/JavaGongNeng03.html-c51a3060.js" as="script"><link rel="prefetch" href="/assets/JavaJinJie02.html-e5a66660.js" as="script"><link rel="prefetch" href="/assets/JavaMyUtil.html-6e16ee98.js" as="script"><link rel="prefetch" href="/assets/MyBatisPlus.html-1cafeb7e.js" as="script"><link rel="prefetch" href="/assets/MySql.html-5adc8c86.js" as="script"><link rel="prefetch" href="/assets/MySqlFunction.html-2c432c8c.js" as="script"><link rel="prefetch" href="/assets/RabbitMQ.html-d771200f.js" as="script"><link rel="prefetch" href="/assets/Redis.html-aa5c160a.js" as="script"><link rel="prefetch" href="/assets/ShiWuAffair.html-ce7fc825.js" as="script"><link rel="prefetch" href="/assets/Spring.html-3d622ed7.js" as="script"><link rel="prefetch" href="/assets/SpringConfig.html-6fe667f9.js" as="script"><link rel="prefetch" href="/assets/SpringPeiZhi.html-96b777da.js" as="script"><link rel="prefetch" href="/assets/SpringSecurity.html-fe792e2f.js" as="script"><link rel="prefetch" href="/assets/WebSocket.html-7fd7be86.js" as="script"><link rel="prefetch" href="/assets/DockerCompose.html-f6ef44c4.js" as="script"><link rel="prefetch" href="/assets/Linux.html-a1058183.js" as="script"><link rel="prefetch" href="/assets/Nginx.html-bf694d87.js" as="script"><link rel="prefetch" href="/assets/RabbitMQ_COPY.html-1e53d902.js" as="script"><link rel="prefetch" href="/assets/Redis_COPY.html-ef853ef3.js" as="script"><link rel="prefetch" href="/assets/Redis_CRUD.html-7a4bb7d5.js" as="script"><link rel="prefetch" href="/assets/DmShengChen.html-92a2db1f.js" as="script"><link rel="prefetch" href="/assets/EasyExcel.html-ac2c3493.js" as="script"><link rel="prefetch" href="/assets/GitLu.html-27823973.js" as="script"><link rel="prefetch" href="/assets/JavaKaiFa.html-ff11bb84.js" as="script"><link rel="prefetch" href="/assets/JSR303.html-0c745945.js" as="script"><link rel="prefetch" href="/assets/MinIO.html-958125dd.js" as="script"><link rel="prefetch" href="/assets/ShardingJDBC.html-ce0afe07.js" as="script"><link rel="prefetch" href="/assets/Swagger.html-9c9fb3be.js" as="script"><link rel="prefetch" href="/assets/Vuepress.html-4e07419a.js" as="script"><link rel="prefetch" href="/assets/Angular.html-3e716bd5.js" as="script"><link rel="prefetch" href="/assets/ElementUI.html-70835a6c.js" as="script"><link rel="prefetch" href="/assets/Html-Js.html-848bb521.js" as="script"><link rel="prefetch" href="/assets/Vue-basics.html-772005d8.js" as="script"><link rel="prefetch" href="/assets/Vue3_group.html-69369e84.js" as="script"><link rel="prefetch" href="/assets/Vue3_option.html-37ac05d4.js" as="script"><link rel="prefetch" href="/assets/ApifoxAPIceshi.html-0bcb1468.js" as="script"><link rel="prefetch" href="/assets/PDManeryuanshujianmo.html-4c377e02.js" as="script"><link rel="prefetch" href="/assets/OCRwenzishibie.html-b4248616.js" as="script"><link rel="prefetch" href="/assets/EasyExcelbiaogeku.html-511b0f0b.js" as="script"><link rel="prefetch" href="/assets/Javadaimashengchengqi.html-33991c95.js" as="script"><link rel="prefetch" href="/assets/JDKshuangbanben.html-8bba14d4.js" as="script"><link rel="prefetch" href="/assets/JSR303canshuxiaoyan.html-7d12c0ef.js" as="script"><link rel="prefetch" href="/assets/Mail  youjian.html-d520132f.js" as="script"><link rel="prefetch" href="/assets/MyBatisPlusxiangjie.html-94d1940a.js" as="script"><link rel="prefetch" href="/assets/MySQLzhucongfuzhi.html-bf156f04.js" as="script"><link rel="prefetch" href="/assets/Redis-API.html-534cd405.js" as="script"><link rel="prefetch" href="/assets/SpringBootshiwu.html-a83407ed.js" as="script"><link rel="prefetch" href="/assets/SpringBootduxiefenli.html-e50eba32.js" as="script"><link rel="prefetch" href="/assets/Springguolvqihelanjieqi.html-b7cdfd68.js" as="script"><link rel="prefetch" href="/assets/WebSocket.html-7c2b5253.js" as="script"><link rel="prefetch" href="/assets/quanjuyichang-JSR303.html-1f70d8b7.js" as="script"><link rel="prefetch" href="/assets/Docker.html-51026828.js" as="script"><link rel="prefetch" href="/assets/Dockeryuanchengfangwenbushu.html-f42be316.js" as="script"><link rel="prefetch" href="/assets/Nginxfanxiangdaili.html-a98dc972.js" as="script"><link rel="prefetch" href="/assets/Apai-SheYingOne.html-b5b7ae7c.js" as="script"><link rel="prefetch" href="/assets/Apai-Year.html-ce260a3f.js" as="script"><link rel="prefetch" href="/assets/My2305.html-8daa1c69.js" as="script"><link rel="prefetch" href="/assets/My2306.html-893e00c1.js" as="script"><link rel="prefetch" href="/assets/My2307.html-e78450ff.js" as="script"><link rel="prefetch" href="/assets/My2308.html-0e38205b.js" as="script"><link rel="prefetch" href="/assets/My2309.html-06a48ebc.js" as="script"><link rel="prefetch" href="/assets/My2310.html-59afa2c3.js" as="script"><link rel="prefetch" href="/assets/My2311.html-b634eab1.js" as="script"><link rel="prefetch" href="/assets/My2312.html-aafaa08a.js" as="script"><link rel="prefetch" href="/assets/Yi-HuBei.html-61c8ef5d.js" as="script"><link rel="prefetch" href="/assets/Yi-ZhuHai.html-26a46f60.js" as="script"><link rel="prefetch" href="/assets/Apache ECharts tubiao.html-e9cc0012.js" as="script"><link rel="prefetch" href="/assets/Vue3 zuheshi API.html-11ae0fbc.js" as="script"><link rel="prefetch" href="/assets/Vue3 xuanxiangshi API.html-ce744458.js" as="script"><link rel="prefetch" href="/assets/Vue3-i18n-guojihuachajian.html-1fa338e8.js" as="script"><link rel="prefetch" href="/assets/Batpichulijiaoben.html-06ab27bc.js" as="script"><link rel="prefetch" href="/assets/Gitgongzuoliu.html-b1e45d5c.js" as="script"><link rel="prefetch" href="/assets/Typoratuchuang.html-cb5c9b25.js" as="script"><link rel="prefetch" href="/assets/Vuepress.html-c36453a2.js" as="script"><link rel="prefetch" href="/assets/My2401.html-9b16cb88.js" as="script"><link rel="prefetch" href="/assets/My2402.html-3ade37a1.js" as="script"><link rel="prefetch" href="/assets/shenhai-0509.html-648d7d95.js" as="script"><link rel="prefetch" href="/assets/zhuhaixing.html-7d486783.js" as="script"><link rel="prefetch" href="/assets/404.html-7c90b0cc.js" as="script"><link rel="prefetch" href="/assets/reco-valine-a0c1af1f.js" as="script">
    <link rel="preload" href="/assets/style-8a0f09c6.css" as="style"><link rel="stylesheet" href="/assets/style-8a0f09c6.css">
  </head>
  <body>
    <div id="app"><!--[--><div class="theme-container"><div class="common-wrapper show-series show-catalog"><div><header class="navbar-container"><!--[--><div class="site-brand nav-item"><img class="logo" src="/logo.png" alt="阿派 | Apai Blog"><a href="/" class="site-name can-hide">阿派 | Apai Blog</a></div><div class="nav-item navbar-links-wrapper" style=""><form class="search-box" role="search"><input type="search" autocomplete="off" spellcheck="false" value><!----></form><nav class="navbar-links"><!--[--><div class="navbar-links__item"><a href="/" class="link router-link-active" aria-label="Home"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->Home<!--]--></span></span><!--[--><!--]--></a></div><div class="navbar-links__item"><a href="/categories/Java/1/" class="link" aria-label="分类组"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->分类组<!--]--></span></span><!--[--><!--]--></a></div><div class="navbar-links__item"><a href="/tags/Rests/1/" class="link" aria-label="标签组"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->标签组<!--]--></span></span><!--[--><!--]--></a></div><div class="navbar-links__item"><div class="dropdown-link"><button class="dropdown-link__title" type="button" aria-label="文档组"><span class="xicon-container left title"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->文档组<!--]--></span></span><span class="arrow down"></span></button><button class="dropdown-link--mobile__title" type="button" aria-label="文档组"><span class="title"><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->文档组<!--]--></span></span></span><span class="right arrow"></span></button><ul style="display:none;" class="dropdown-link__container"><!--[--><li class="dropdown-link__item"><a href="/docs/Web-develop/Html-Js" class="link" aria-label="Web-开发"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->Web-开发<!--]--></span></span><!--[--><!--]--></a></li><li class="dropdown-link__item"><a href="/docs/Java-develop/JavaMyUtil" class="link" aria-label="Java-开发"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->Java-开发<!--]--></span></span><!--[--><!--]--></a></li><li class="dropdown-link__item"><a href="/docs/Linux-develop/Linux" class="link" aria-label="Linux-系统"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->Linux-系统<!--]--></span></span><!--[--><!--]--></a></li><li class="dropdown-link__item"><a href="/docs/Rests-docs/Vuepress" class="link" aria-label="Apai-其他"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->Apai-其他<!--]--></span></span><!--[--><!--]--></a></li><!--]--></ul></div></div><div class="navbar-links__item"><div class="dropdown-link"><button class="dropdown-link__title" type="button" aria-label="花圃里"><span class="xicon-container left title"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->花圃里<!--]--></span></span><span class="arrow down"></span></button><button class="dropdown-link--mobile__title" type="button" aria-label="花圃里"><span class="title"><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->花圃里<!--]--></span></span></span><span class="right arrow"></span></button><ul style="display:none;" class="dropdown-link__container"><!--[--><li class="dropdown-link__item"><a href="/docs/Apai-MyRecord/My-2023/My2307" class="link" aria-label="2023-花开万里"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->2023-花开万里<!--]--></span></span><!--[--><!--]--></a></li><li class="dropdown-link__item"><a href="/docs/Apai-MyRecord/My-2024/My2401" class="link" aria-label="2024-随心而来"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->2024-随心而来<!--]--></span></span><!--[--><!--]--></a></li><!--]--></ul></div></div><div class="navbar-links__item"><a href="/docs/Apai-AboutMe/Lu-aboutMe" class="link" aria-label="关于我"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->关于我<!--]--></span></span><!--[--><!--]--></a></div><!--]--></nav><span class="xicon-container btn-toggle-dark-mode btn--dark-mode"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32" style="width:20px;height:20px;font-size:20px;color:inherit;"><path d="M15 2h2v3h-2z" fill="currentColor"></path><path d="M27 15h3v2h-3z" fill="currentColor"></path><path d="M15 27h2v3h-2z" fill="currentColor"></path><path d="M2 15h3v2H2z" fill="currentColor"></path><path d="M5.45 6.884l1.414-1.415l2.121 2.122l-1.414 1.414z" fill="currentColor"></path><path d="M23 7.58l2.121-2.12l1.414 1.414l-2.121 2.121z" fill="currentColor"></path><path d="M23.002 24.416l1.415-1.414l2.12 2.122l-1.413 1.414z" fill="currentColor"></path><path d="M5.47 25.13L7.59 23L9 24.42l-2.12 2.12l-1.41-1.41z" fill="currentColor"></path><path d="M16 8a8 8 0 1 0 8 8a8 8 0 0 0-8-8zm0 14a6 6 0 0 1 0-12z" fill="currentColor"></path></svg></span><span class="xicon-container btn-toggle-menus"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32" style="width:20px;height:20px;font-size:20px;color:inherit;"><circle cx="16" cy="8" r="2" fill="currentColor"></circle><circle cx="16" cy="16" r="2" fill="currentColor"></circle><circle cx="16" cy="24" r="2" fill="currentColor"></circle></svg></span></div><!--]--></header><div class="mobile-menus-container"><nav class="navbar-links mobile"><!--[--><div class="navbar-links__item"><a href="/" class="link router-link-active" aria-label="Home"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->Home<!--]--></span></span><!--[--><!--]--></a></div><div class="navbar-links__item"><a href="/categories/Java/1/" class="link" aria-label="分类组"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->分类组<!--]--></span></span><!--[--><!--]--></a></div><div class="navbar-links__item"><a href="/tags/Rests/1/" class="link" aria-label="标签组"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->标签组<!--]--></span></span><!--[--><!--]--></a></div><div class="navbar-links__item"><div class="dropdown-link"><button class="dropdown-link__title" type="button" aria-label="文档组"><span class="xicon-container left title"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->文档组<!--]--></span></span><span class="arrow down"></span></button><button class="dropdown-link--mobile__title" type="button" aria-label="文档组"><span class="title"><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->文档组<!--]--></span></span></span><span class="right arrow"></span></button><ul style="display:none;" class="dropdown-link__container"><!--[--><li class="dropdown-link__item"><a href="/docs/Web-develop/Html-Js" class="link" aria-label="Web-开发"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->Web-开发<!--]--></span></span><!--[--><!--]--></a></li><li class="dropdown-link__item"><a href="/docs/Java-develop/JavaMyUtil" class="link" aria-label="Java-开发"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->Java-开发<!--]--></span></span><!--[--><!--]--></a></li><li class="dropdown-link__item"><a href="/docs/Linux-develop/Linux" class="link" aria-label="Linux-系统"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->Linux-系统<!--]--></span></span><!--[--><!--]--></a></li><li class="dropdown-link__item"><a href="/docs/Rests-docs/Vuepress" class="link" aria-label="Apai-其他"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->Apai-其他<!--]--></span></span><!--[--><!--]--></a></li><!--]--></ul></div></div><div class="navbar-links__item"><div class="dropdown-link"><button class="dropdown-link__title" type="button" aria-label="花圃里"><span class="xicon-container left title"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->花圃里<!--]--></span></span><span class="arrow down"></span></button><button class="dropdown-link--mobile__title" type="button" aria-label="花圃里"><span class="title"><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->花圃里<!--]--></span></span></span><span class="right arrow"></span></button><ul style="display:none;" class="dropdown-link__container"><!--[--><li class="dropdown-link__item"><a href="/docs/Apai-MyRecord/My-2023/My2307" class="link" aria-label="2023-花开万里"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->2023-花开万里<!--]--></span></span><!--[--><!--]--></a></li><li class="dropdown-link__item"><a href="/docs/Apai-MyRecord/My-2024/My2401" class="link" aria-label="2024-随心而来"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->2024-随心而来<!--]--></span></span><!--[--><!--]--></a></li><!--]--></ul></div></div><div class="navbar-links__item"><a href="/docs/Apai-AboutMe/Lu-aboutMe" class="link" aria-label="关于我"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->关于我<!--]--></span></span><!--[--><!--]--></a></div><!--]--></nav><div class="appearance"><span>Appearance</span><span class="xicon-container btn-toggle-dark-mode"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32" style="width:20px;height:20px;font-size:20px;color:inherit;"><path d="M15 2h2v3h-2z" fill="currentColor"></path><path d="M27 15h3v2h-3z" fill="currentColor"></path><path d="M15 27h2v3h-2z" fill="currentColor"></path><path d="M2 15h3v2H2z" fill="currentColor"></path><path d="M5.45 6.884l1.414-1.415l2.121 2.122l-1.414 1.414z" fill="currentColor"></path><path d="M23 7.58l2.121-2.12l1.414 1.414l-2.121 2.121z" fill="currentColor"></path><path d="M23.002 24.416l1.415-1.414l2.12 2.122l-1.413 1.414z" fill="currentColor"></path><path d="M5.47 25.13L7.59 23L9 24.42l-2.12 2.12l-1.41-1.41z" fill="currentColor"></path><path d="M16 8a8 8 0 1 0 8 8a8 8 0 0 0-8-8zm0 14a6 6 0 0 1 0-12z" fill="currentColor"></path></svg></span></div></div><div class="series-mask"></div><aside class="series-container"><div class="site-brand"><img class="logo" src="/logo.png" alt="阿派 | Apai Blog"><a href="/" class="site-name can-hide">阿派 | Apai Blog</a></div><!--[--><!--[--><section class="series-group series-item"><h5 class="series-heading">My Apai</h5><ul><li><!--[--><a href="/docs/Rests-docs/JavaKaiFa.html" class="link series-item" aria-label="Java 开发的工具"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->Java 开发的工具<!--]--></span></span><!--[--><!--]--></a><!--]--></li><li><!--[--><a href="/docs/Rests-docs/DmShengChen.html" class="link series-item" aria-label="Java 代码生成器"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->Java 代码生成器<!--]--></span></span><!--[--><!--]--></a><!--]--></li></ul></section><!--]--><!--[--><section class="series-group series-item"><h5 class="series-heading active">Apai 大杂烩</h5><ul><li><!--[--><a href="/docs/Rests-docs/Vuepress.html" class="link series-item" aria-label="个人网站搭建"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->个人网站搭建<!--]--></span></span><!--[--><!--]--></a><!--]--></li><li><!--[--><a href="/docs/Rests-docs/GitLu.html" class="link series-item" aria-label="Git 工作流"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->Git 工作流<!--]--></span></span><!--[--><!--]--></a><!--]--></li><li><!--[--><a aria-current="page" href="/docs/Rests-docs/BatJiaoBen.html" class="router-link-active router-link-exact-active link router-link-active series-item active" aria-label="Bat 批处理脚本"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->Bat 批处理脚本<!--]--></span></span><!--[--><!--]--></a><!--]--></li></ul></section><!--]--><!--[--><section class="series-group series-item"><h5 class="series-heading">技术组</h5><ul><li><!--[--><a href="/docs/Rests-docs/ShardingJDBC.html" class="link series-item" aria-label="Spring 分库分表"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->Spring 分库分表<!--]--></span></span><!--[--><!--]--></a><!--]--></li><li><!--[--><a href="/docs/Rests-docs/Swagger.html" class="link series-item" aria-label="Swagger 接口测试"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->Swagger 接口测试<!--]--></span></span><!--[--><!--]--></a><!--]--></li><li><!--[--><a href="/docs/Rests-docs/EasyExcel.html" class="link series-item" aria-label="Easy Excel 表格库"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->Easy Excel 表格库<!--]--></span></span><!--[--><!--]--></a><!--]--></li><li><!--[--><a href="/docs/Rests-docs/JSR303.html" class="link series-item" aria-label="JSR303n 参数校验"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->JSR303n 参数校验<!--]--></span></span><!--[--><!--]--></a><!--]--></li></ul></section><!--]--><!--[--><section class="series-group series-item"><h5 class="series-heading">工具组</h5><ul><li><!--[--><a href="/docs/Rests-docs/MinIO.html" class="link series-item" aria-label="MinIO 对象存储"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->MinIO 对象存储<!--]--></span></span><!--[--><!--]--></a><!--]--></li></ul></section><!--]--><!--]--></aside><!--[--><main class="page-container"><h1 class="page-title">Bat 批处理脚本</h1><div class="page-info"><span class="xicon-container left"><!--[--><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32" class="xicon-icon" style="width:18px;height:18px;font-size:18px;color:inherit;"><path d="M16 4a5 5 0 1 1-5 5a5 5 0 0 1 5-5m0-2a7 7 0 1 0 7 7a7 7 0 0 0-7-7z" fill="currentColor"></path><path d="M26 30h-2v-5a5 5 0 0 0-5-5h-6a5 5 0 0 0-5 5v5H6v-5a7 7 0 0 1 7-7h6a7 7 0 0 1 7 7z" fill="currentColor"></path></svg><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->LuisApai<!--]--></span></span><span class="xicon-container left"><!--[--><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32" class="xicon-icon" style="width:18px;height:18px;font-size:18px;color:inherit;"><path d="M26 4h-4V2h-2v2h-8V2h-2v2H6c-1.1 0-2 .9-2 2v20c0 1.1.9 2 2 2h20c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 22H6V12h20v14zm0-16H6V6h4v2h2V6h8v2h2V6h4v4z" fill="currentColor"></path></svg><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->2023/05/16<!--]--></span></span><!----><!----><!----></div><div class="theme-reco-default-content"><div><h2 id="bat-命令" tabindex="-1"><a class="header-anchor" href="#bat-命令" aria-hidden="true">#</a> .bat 命令</h2><h3 id="基础命令" tabindex="-1"><a class="header-anchor" href="#基础命令" aria-hidden="true">#</a> 基础命令</h3><div class="language-JAVA line-numbers-mode" data-ext="JAVA"><pre class="language-JAVA"><code>// 备注
@REM 后面的为备注内容

// 关闭在运行批处理时显示命令行窗口的回显功能
@echo off
    
// 在 cmd 输入 Path 变量的值 调用变量: &quot;%Path%&quot; 拼接: %fileName%/%fileName%-%home%
set /p Path = 提示语句

// 获取 Path 变量的值 进入指定路径的文件夹内
cd /d &quot;%Path%&quot;
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="常用命令" tabindex="-1"><a class="header-anchor" href="#常用命令" aria-hidden="true">#</a> 常用命令</h3><div class="language-java line-numbers-mode" data-ext="java"><pre class="language-java"><code><span class="token comment">// 设置变量 set 变量名 = 变量值</span>
set home <span class="token operator">=</span> aaaa
    
<span class="token comment">// xcopy /s /e &quot;源文件夹路径&quot; &quot;目标文件夹路径&quot; </span>
<span class="token comment">// 其中，/s 表示复制子目录和文件，/e 表示包括空的子目录 /y参数告诉xcopy命令覆盖任何现有文件而不提示</span>
<span class="token comment">// 例如，xcopy /s /e &quot;C:\Folder1&quot; &quot;D:\Folder2&quot; 将 C:\Folder1 中的所有内容复制到 D:\Folder2，可以使用以下命令：</span>
<span class="token comment">// 相同文件会询问是否覆盖</span>
xcopy <span class="token operator">/</span>s <span class="token operator">/</span>e <span class="token string">&quot;C:\Tools\test&quot;</span> <span class="token string">&quot;C:\Tools\cptest&quot;</span>   
xcopy <span class="token operator">/</span>s <span class="token operator">/</span>y <span class="token string">&quot;C:\Tools\test&quot;</span> <span class="token string">&quot;C:\Tools\cptest&quot;</span>

<span class="token comment">// 判断ifDetial变量是否为 Y 是则进入执行</span>
set <span class="token operator">/</span>p ifDetial<span class="token operator">=</span>shengchen detail is <span class="token class-name">Y</span><span class="token operator">/</span><span class="token class-name">N</span> <span class="token operator">?</span> 
<span class="token keyword">if</span> <span class="token string">&quot;%ifDetial%&quot;</span><span class="token operator">==</span><span class="token string">&quot;Y&quot;</span> <span class="token punctuation">(</span>
    call ng g c <span class="token operator">%</span>fileName<span class="token operator">%</span><span class="token operator">/</span><span class="token operator">%</span>fileName<span class="token operator">%</span><span class="token operator">-</span><span class="token operator">%</span>detail<span class="token operator">%</span>
<span class="token punctuation">)</span>
    
<span class="token comment">// 跳转到 end 标签位置</span>
<span class="token keyword">goto</span> end
<span class="token comment">// 设置跳转标签</span>
<span class="token operator">:</span>end
    
<span class="token comment">// 终止脚本</span>
exit
  
<span class="token comment">// 打印提示语句 | echo 提示内容</span>
echo <span class="token class-name">Component</span> generated successfully <span class="token constant">OKK</span> <span class="token operator">--</span> <span class="token class-name">Apai</span>
    
<span class="token comment">// 点击任意按钮结束</span>
pause

<span class="token comment">// 获取当前文件的所在目录地址 %~dp0</span>
set modulePath<span class="token operator">=</span><span class="token operator">%</span><span class="token operator">~</span>dp0
<span class="token comment">// 变量拼接</span>
set modulePackPath<span class="token operator">=</span><span class="token string">&quot;%modulePath%&quot;</span>\<span class="token punctuation">.</span>vuepress\dist
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="bat-避坑指南" tabindex="-1"><a class="header-anchor" href="#bat-避坑指南" aria-hidden="true">#</a> Bat 避坑指南</h2><h3 id="cmd-窗口中文乱码" tabindex="-1"><a class="header-anchor" href="#cmd-窗口中文乱码" aria-hidden="true">#</a> Cmd 窗口中文乱码</h3><blockquote><p>出现在Windows中使用的默认编码格式与.bat脚本中的编码格式不同导致的</p></blockquote><ol><li>将.bat脚本的编码格式修改为与您的Windows系统默认编码格式一致（例如UTF-8或GB2312,您可以使用文本编辑器（如Notepad++）打开脚本并更改编码格式，然后保存文件。</li><li>在运行.bat脚本之前，在命令窗口中输入以下命令：<code>chcp 65001</code>。这将把命令窗口的编码格式切换为UTF-8，以便正确显示中文字符。</li></ol><div class="language-bat line-numbers-mode" data-ext="bat"><pre class="language-bat"><code>@echo off

@REM 解决中文乱码
chcp 65001

:start
@REM 输入 提交信息
@REM set /p prot=&quot;APP is prot : ... ? &quot;
set /p prot=&quot;需要关闭的端口是: ... ? &quot;
netstat -ano | findstr :&quot;%prot%&quot;
FOR /F &quot;tokens=5 delims= &quot; %%P IN (&#39;netstat -ano ^| findstr :%prot%&#39;) DO SET PID=%%P
IF &quot;%PID%&quot; == &quot;&quot; (
    ECHO Unable to find process ID for port %PORT_NUMBER%
) ELSE (
    ECHO Process ID for port %PORT_NUMBER% is %PID%
    taskkill -PID %PID% -F 
)
set /p goto= public bool KeepRunning: Y/N ? 
if &quot;%goto%&quot;==&quot;Y&quot; (
    goto start
)
pause
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="批量生成-angular-组件" tabindex="-1"><a class="header-anchor" href="#批量生成-angular-组件" aria-hidden="true">#</a> 批量生成 Angular 组件</h2><h3 id="安装-angular-框架" tabindex="-1"><a class="header-anchor" href="#安装-angular-框架" aria-hidden="true">#</a> 安装 Angular 框架</h3><div class="language-java line-numbers-mode" data-ext="java"><pre class="language-java"><code><span class="token comment">// 打开命令提示符窗口或终端 运行以下命令来安装 Angular CLI：</span>
npm install <span class="token operator">-</span>g <span class="token annotation punctuation">@angular</span><span class="token operator">/</span>cli
<span class="token comment">// 等待安装完成后，可以通过运行以下命令来验证安装是否成功：</span>
ng version
<span class="token comment">// 如果显示了 Angular CLI 的版本信息，则表示安装成功。</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code>C:<span class="token punctuation">\</span>Users<span class="token punctuation">\</span>Apai_Lu<span class="token operator">&gt;</span>npm <span class="token function">install</span> <span class="token parameter variable">-g</span> @angular/cli
<span class="token function">npm</span> WARN deprecated @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs

added <span class="token number">256</span> packages <span class="token keyword">in</span> 13s

C:<span class="token punctuation">\</span>Users<span class="token punctuation">\</span>Apai_Lu<span class="token operator">&gt;</span>ng version
? Would you like to share pseudonymous usage data about this project with the Angular Team
at Google under Google<span class="token string">&#39;s Privacy Policy at https://policies.google.com/privacy. For more
details and how to change this setting, see https://angular.io/analytics. No
Global setting: disabled
Local setting: No local workspace configuration file.
Effective status: disabled
     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | &#39;</span>_ <span class="token punctuation">\</span> / _<span class="token variable"><span class="token variable">`</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span>/ _<span class="token variable">`</span></span> <span class="token operator">|</span> &#39;__<span class="token operator">|</span>   <span class="token operator">|</span> <span class="token operator">|</span>   <span class="token operator">|</span> <span class="token operator">|</span>    <span class="token operator">|</span> <span class="token operator">|</span>
  / ___ <span class="token punctuation">\</span><span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token punctuation">(</span>_<span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span>_<span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token punctuation">(</span>_<span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span>      <span class="token operator">|</span> <span class="token operator">|</span>___<span class="token operator">|</span> <span class="token operator">|</span>___ <span class="token operator">|</span> <span class="token operator">|</span>
 /_/   <span class="token punctuation">\</span>_<span class="token punctuation">\</span>_<span class="token operator">|</span> <span class="token operator">|</span>_<span class="token operator">|</span><span class="token punctuation">\</span>__, <span class="token operator">|</span><span class="token punctuation">\</span>__,_<span class="token operator">|</span>_<span class="token operator">|</span><span class="token punctuation">\</span>__,_<span class="token operator">|</span>_<span class="token operator">|</span>       <span class="token punctuation">\</span>____<span class="token operator">|</span>_____<span class="token operator">|</span>___<span class="token operator">|</span>
                <span class="token operator">|</span>___/
Angular CLI: <span class="token number">16.0</span>.1
Node: <span class="token number">18.12</span>.1
Package Manager: <span class="token function">npm</span> <span class="token number">8.19</span>.2
OS: win32 x64

Angular:
<span class="token punctuation">..</span>.
Package                      Version
------------------------------------------------------
@angular-devkit/architect    <span class="token number">0.1600</span>.1 <span class="token punctuation">(</span>cli-only<span class="token punctuation">)</span>
@angular-devkit/core         <span class="token number">16.0</span>.1 <span class="token punctuation">(</span>cli-only<span class="token punctuation">)</span>
@angular-devkit/schematics   <span class="token number">16.0</span>.1 <span class="token punctuation">(</span>cli-only<span class="token punctuation">)</span>
@schematics/angular          <span class="token number">16.0</span>.1 <span class="token punctuation">(</span>cli-only<span class="token punctuation">)</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="编写-bat-脚本" tabindex="-1"><a class="header-anchor" href="#编写-bat-脚本" aria-hidden="true">#</a> 编写 .bat 脚本</h3><blockquote><p>1.0 基础版</p></blockquote><div class="language-bat line-numbers-mode" data-ext="bat"><pre class="language-bat"><code>@REM 关闭在运行批处理时显示命令行窗口的回显功能
@echo off

@REM 解决中文乱码
chcp 65001

@REM 询问用户生成的模块 存放路径 例如: F:\Mayun\Mayun_sanitary_web\src\pages\finance
set /p filePath=wen jian lu jian ? 
@REM 询问用户生成的模块 名称 例如: aaa-bbb
set /p fileName=wen jian ming cheng ? 

@REM 进入需要生成的模块路径文件夹内
cd /d &quot;%filePath%&quot;
@REM 创建组件 主页面
call ng g c %fileName%/&quot;%fileName%&quot;

@REM 创建组件 增改框
set operate=operate
call ng g c %fileName%/%fileName%-%operate%

@REM 组件名称拼接的变量
set home=home
set detail=detail
set choice=choice

@REM 判断是否生成 home 双页面组件
set /p ifHome=shengchen home is Y/N ? 
if &quot;%ifHome%&quot;==&quot;Y&quot; (
    call ng g c %fileName%/%fileName%-%home%
)

@REM 判断是否生成 详情页组件
set /p ifDetial=shengchen detail is Y/N ? 
if &quot;%ifDetial%&quot;==&quot;Y&quot; (
    call ng g c %fileName%/%fileName%-%detail%
)

@REM 判断是否生成 choice 选入框
set /p ifChoice=shengchen choice is Y/N ? 
if &quot;%ifChoice%&quot;==&quot;Y&quot; (
    call ng g c %fileName%/%fileName%-%choice%
)

@REM 判断是否生成 模块的Api服务
set /p ifApi=shengchen choice is Y/N ? 
if &quot;%ifApi%&quot;==&quot;N&quot; (
    REM 跳转到结束标签
    goto end
)

@REM 询问用户生成的模块的Api服务 路径 例如: F:\Mayun\Mayun_sanitary_web\src\api\finance
set /p apiPath=mo kuai Api lu jing ? 

@REM 进入需要生成的模块路径文件夹内 备注: 小bug
cd &quot;%apiPath%&quot;
call ng g s %fileName%/%fileName%

@REM goto的跳转标签
:end

@REM 执行完毕 生成成功后显示提示
echo Component generated successfully OKK -- Apai
@REM 点击任意按钮结束
pause
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><blockquote><p>2.0 提示中文化</p></blockquote><div class="language-bat line-numbers-mode" data-ext="bat"><pre class="language-bat"><code>@REM 关闭在运行批处理时显示命令行窗口的回显功能
@echo off

@REM 解决中文乱码
chcp 65001

echo 卢卢卢的提示: 默认自动生成 主页面及详情页面 !!!

@REM 询问用户生成的模块 存放路径 例如: F:\Mayun\Mayun_sanitary_web\src\pages\finance
set /p filePath=指定 该模块 的存放路径: ...... ? 
@REM 询问用户生成的模块 名称 例如: aaa-bbb
set /p fileName=指定 该模块 的名称: ...... ? 

@REM 进入需要生成的模块路径文件夹内
cd /d &quot;%filePath%&quot;
@REM 创建组件 主页面
call ng g c %fileName%/&quot;%fileName%&quot;

@REM 创建组件 增改框
set operate=operate
call ng g c %fileName%/%fileName%-%operate%

@REM 组件名称拼接的变量
set home=home
set detail=detail
set choice=choice

@REM 判断是否生成 home 双页面组件
set /p ifHome=是否生成标签的 Home 页面: ... Y/N ? 
if &quot;%ifHome%&quot;==&quot;Y&quot; (
    call ng g c %fileName%/%fileName%-%home%
)

@REM 判断是否生成 详情页组件
set /p ifDetial=是否生成 Detail 子页面: ... Y/N ? 
if &quot;%ifDetial%&quot;==&quot;Y&quot; (
    call ng g c %fileName%/%fileName%-%detail%
)

@REM 判断是否生成 choice 选入框
set /p ifChoice=是否生成 Choice 选入框页面: ... Y/N ? 
if &quot;%ifChoice%&quot;==&quot;Y&quot; (
    call ng g c %fileName%/%fileName%-%choice%
)

@REM 判断是否生成 模块的Api服务
set /p ifApi=是否生成 ApiFile 接口文件: ... Y/N ? 
if &quot;%ifApi%&quot;==&quot;N&quot; (
    REM 跳转到结束标签
    goto end
)

@REM 询问用户生成的模块的Api服务 路径 例如: F:\Mayun\Mayun_sanitary_web\src\api\finance
set /p apiPath=生成 ApiFile 接口文件的路径为: ... ? 

@REM 进入需要生成的模块路径文件夹内 备注: 小bug
cd &quot;%apiPath%&quot;
call ng g s %fileName%/%fileName%

@REM goto的跳转标签
:end

@REM 执行完毕 生成成功后显示提示
echo 超帅的好嘛, 生成脚本执行完毕 OKK -- Apai
@REM 点击任意按钮结束
pause
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="一键提交git" tabindex="-1"><a class="header-anchor" href="#一键提交git" aria-hidden="true">#</a> 一键提交Git</h2><ul><li>先安装Git管理</li><li>cd 切换目录时 : 路径中文无法识别，所以需要转换为英文 或者 放到仓库根目录下</li><li>提交弹出登录框 只需登录一次 后续无需登录</li><li>&quot;%commit_message%&quot; 不能为中文标点</li></ul><div class="language-bat line-numbers-mode" data-ext="bat"><pre class="language-bat"><code>@echo off

@REM 解决中文乱码
chcp 65001

@REM 输入 提交信息
set /p commit_message=&quot;提交信息 commit -m 为: ... ? &quot;

@REM 路径中文无法识别，所以需要转换为英文 或者 放到仓库根目录下
@REM cd /d C:\阿派_文件夹\Gitee_Apai\Typora_MD

@REM 初始化仓库
git init
@REM 将所有文件添加到暂存区
git add .  
@REM 将暂存区所有文件进行本地提交
git commit -m “%commit_message%”  
@REM 上传远程仓库
git push

pause
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="一键提交-网站-git-脚本" tabindex="-1"><a class="header-anchor" href="#一键提交-网站-git-脚本" aria-hidden="true">#</a> 一键提交 网站 Git 脚本</h2><h3 id="基础版" tabindex="-1"><a class="header-anchor" href="#基础版" aria-hidden="true">#</a> 基础版</h3><div class="language-bat line-numbers-mode" data-ext="bat"><pre class="language-bat"><code>@REM 关闭在运行批处理时显示命令行窗口的回显功能
@echo off

@REM 输入提示信息
set /p commit_message=&quot;git commit -m ... ?&quot;

@REM ---------------------------- 第一部分提交 ---------------------------------
@REM 进入 项目 模块 
@REM 阿派: F:\Gitee-Bolg 码云: C:\Tools\Gitee_LuisApai
@REM cd /d F:\Gitee-Bolg
cd /d C:\Tools\Gitee_LuisApai

@REM 初始化仓库
git init
@REM 将所有文件添加到暂存区
git add .  
@REM 将暂存区所有文件进行本地提交
git commit -m &quot;%commit_message%&quot;
@REM 上传远程仓库
git push

@REM 执行完毕 生成成功后显示提示
echo Gitee Bolg MD --&gt; puls OKK !

@REM ---------------------------- 第二部分提交 ---------------------------------

@REM 进入 项目打包 模块
@REM 阿派: F:\Gitee-Bolg\.vuepress\ApaiBolg 码云: C:\Tools\Gitee_LuisApai\.vuepress\ApaiBolg
@REM cd /d F:\Gitee-Bolg\.vuepress\ApaiBolg
cd /d C:\Tools\Gitee_LuisApai\.vuepress\ApaiBolg

@REM 初始化仓库
git init
@REM 将所有文件添加到暂存区
git add .  
@REM 将暂存区所有文件进行本地提交
git commit -m &quot;%commit_message%&quot;
@REM 上传远程仓库
git push


@REM 执行完毕 生成成功后显示提示
echo Gitee Bolg WEB --&gt; puls OKK !
@REM 点击任意按钮结束
pause
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="修改版-自动拷贝" tabindex="-1"><a class="header-anchor" href="#修改版-自动拷贝" aria-hidden="true">#</a> 修改版 自动拷贝</h3><div class="language-bat line-numbers-mode" data-ext="bat"><pre class="language-bat"><code>@REM 关闭在运行批处理时显示命令行窗口的回显功能
@echo off

@REM 输入提示信息
set /p commit_message=&quot;git commit -m ... ?&quot;

@REM 设置变量 set 变量名 = 变量值 模块 Git打包 模块打包路径
set modulePath=C:\Tools\Gitee_LuisApai
set packPath=C:\Tools\Gitee_LuisApai\.vuepress\ApaiBolg
set modulePackPath=C:\Tools\Gitee_LuisApai\.vuepress\dist

@REM ---------------------------- 第一部分提交 ---------------------------------
@REM 进入 项目 模块 
cd /d &quot;%modulePath%&quot;

@REM 初始化仓库
git init
@REM 将所有文件添加到暂存区
git add .  
@REM 将暂存区所有文件进行本地提交
git commit -m &quot;%commit_message%&quot;
@REM 上传远程仓库
git push

@REM 执行完毕 生成成功后显示提示
echo Gitee Bolg MD --&gt; puls OKK !

@REM @REM ---------------------------- 第二部分提交 ---------------------------------

@REM xcopy /s /e &quot;源文件夹路径&quot; &quot;目标文件夹路径&quot; 其中，/s 表示复制子目录和文件，/e 表示包括空的子目录 /y参数告诉xcopy命令覆盖任何现有文件而不提示
@REM 例如，xcopy /s /e &quot;C:\Folder1&quot; &quot;D:\Folder2&quot; 将 C:\Folder1 中的所有内容复制到 D:\Folder2，可以使用以下命令：
xcopy /s /y &quot;%modulePackPath%&quot; &quot;%packPath%&quot;


@REM 进入 项目打包 模块
@REM cd /d F:\Gitee-Bolg\.vuepress\ApaiBolg
cd /d &quot;%packPath%&quot;
@REM 初始化仓库
git init
@REM 将所有文件添加到暂存区
git add .  
@REM 将暂存区所有文件进行本地提交
git commit -m &quot;%commit_message%&quot;
@REM 上传远程仓库
git push


@REM 执行完毕 生成成功后显示提示
echo Gitee Bolg WEB --&gt; puls OKK !
@REM 点击任意按钮结束
pause
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="打包-github-3-0-版" tabindex="-1"><a class="header-anchor" href="#打包-github-3-0-版" aria-hidden="true">#</a> 打包 GitHub 3.0 版</h3><div class="language-bat line-numbers-mode" data-ext="bat"><pre class="language-bat"><code>@REM 关闭在运行批处理时显示命令行窗口的回显功能 自动拷贝 Git提交版
@echo off

@REM 设置变量 set 变量名 = 变量值 模块 Git打包 模块打包路径
set modulePath=%~dp0

@REM ---------------------------- 1. 进入文件所在目录 ---------------------------------
@REM 进入 项目 模块
cd /d &quot;%modulePath%&quot;

@REM 进行 项目 模块打包
npm run build

@REM @REM ---------------------------- 2. 执行完毕 ---------------------------------
@REM 执行完毕 生成成功后显示提示
echo da bao --&gt; is OKK !
@REM 点击任意按钮结束
pause
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><div class="language-bat line-numbers-mode" data-ext="bat"><pre class="language-bat"><code>@REM 关闭在运行批处理时显示命令行窗口的回显功能 自动拷贝 Git提交版
@echo off

@REM 解决中文乱码
chcp 65001

@REM 设置变量 set 变量名 = 变量值 模块 Git打包 模块打包路径
set modulePath=%~dp0
set modulePackPath=&quot;%modulePath%&quot;\.vuepress\dist
set packPath=&quot;%modulePath%&quot;\.vuepress\ApaiBolg
set githubPath=&quot;%modulePath%&quot;\.vuepress\GithubBolg

@REM ---------------------------- 1. 进入文件所在目录 ---------------------------------
@REM 进入 项目 模块
cd /d &quot;%modulePath%&quot;

@REM 进行 项目 模块打包 (打完包会自动退出 拆开运行)
@REM npm run build

@REM 输入提示信息
set /p commit_message=&quot;提交信息 commit -m 为: ... ?&quot;

@REM @REM ---------------------------- 2. 复制文件 ---------------------------------
@REM xcopy /s /e &quot;源文件夹路径&quot; &quot;目标文件夹路径&quot; 其中，/s 表示复制子目录和文件，/e 表示包括空的子目录 /y参数告诉xcopy命令覆盖任何现有文件而不提示
@REM 例如，xcopy /s /e &quot;C:\Folder1&quot; &quot;D:\Folder2&quot; 将 C:\Folder1 中的所有内容复制到 D:\Folder2，可以使用以下命令：
xcopy /s /y &quot;%modulePackPath%&quot; &quot;%packPath%&quot;
xcopy /s /y &quot;%modulePackPath%&quot; &quot;%githubPath%&quot;

@REM ---------------------------- 3. 提交 Gitee 项目源文件 ---------------------------------
@REM 初始化仓库
git init
@REM 将所有文件添加到暂存区
git add .
@REM 将暂存区所有文件进行本地提交
git commit -m &quot;%commit_message%&quot;
@REM 上传远程仓库
git push

@REM 执行完毕 生成成功后显示提示
echo Gitee Bolg MD --&gt; puls OKK !

@REM @REM ---------------------------- 4. 提交 Gitee 打包文件 ---------------------------------
@REM 进入 Gitee 打包 模块
@REM cd /d F:\Gitee-Bolg\.vuepress\ApaiBolg
cd /d &quot;%packPath%&quot;
@REM 初始化仓库
git init
@REM 将所有文件添加到暂存区
git add .
@REM 将暂存区所有文件进行本地提交
git commit -m &quot;%commit_message%&quot;
@REM 上传远程仓库
git push

@REM @REM ---------------------------- 4. 提交 Github 打包文件 ---------------------------------
@REM 进入 Github 打包 模块
cd /d &quot;%githubPath%&quot;
@REM 初始化仓库
git init
@REM 将所有文件添加到暂存区
git add .
@REM 将暂存区所有文件进行本地提交
git commit -m &quot;%commit_message%&quot;
@REM 上传远程仓库
git push

@REM @REM ---------------------------- 6. 执行完毕 ---------------------------------
@REM 执行完毕 生成成功后显示提示
echo 执行完毕 生成成功 Gitee Bolg WEB --&gt; puls OKK !
@REM 点击任意按钮结束
pause
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="一键关闭端口" tabindex="-1"><a class="header-anchor" href="#一键关闭端口" aria-hidden="true">#</a> 一键关闭端口</h2><div class="language-bat line-numbers-mode" data-ext="bat"><pre class="language-bat"><code>@echo off

@REM 解决中文乱码
chcp 65001

:start

@REM 输入 提交信息
@REM set /p prot=&quot;APP is prot : ... ? &quot;
set /p prot=&quot;超帅的好嘛, 需要关闭的端口是: ... ? &quot;

@REM 打印端口休息
netstat -ano | findstr :&quot;%prot%&quot;

@REM 根据端口获取其PID
FOR /F &quot;tokens=5 delims= &quot; %%P IN (&#39;netstat -ano ^| findstr :%prot%&#39;) DO SET PID=%%P
IF &quot;%PID%&quot; == &quot;&quot; (
    ECHO 暂无端口 %prot% 的PID
) ELSE (
    @REM 获取到PID进行关闭端口
    ECHO 该端口 %prot% 的PID: %PID% 
    taskkill -PID %PID% -F 
    ECHO 该端口 %prot% 已关闭 !!!
)

@REM 
set /p goto= 是否继续关闭端口: Y/N ? 
if &quot;%goto%&quot;==&quot;Y&quot; (
	@REM 跳转到 start 标签处
    goto start
)

pause
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p><img src="https://cdn.jsdelivr.net/gh/LuJunandapai/ApaiImage@main/MaYun-PicGo/image-20230626174824068.png" alt="image-20230626174824068"></p></div></div><footer class="page-meta"><!----><div class="meta-item last-updated"><span class="xicon-container left meta-item-label"><!--[--><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32" class="xicon-icon" style="width:20px;height:20px;font-size:20px;color:inherit;"><path d="M26 4h-4V2h-2v2h-8V2h-2v2H6c-1.1 0-2 .9-2 2v20c0 1.1.9 2 2 2h20c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 22H6V12h20v14zm0-16H6V6h4v2h2V6h8v2h2V6h4v4z" fill="currentColor"></path></svg><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->Last Updated 2023-07-19 09:58:39<!--]--></span></span></div></footer><nav class="page-nav"><p class="hasPrev inner"><span class="page-nav-item prev"> ← Git 工作流</span><!----></p></nav><!----></main><!--]--><div class="page-catalog-container"><h5 class="tip">文章层级目录</h5><ul><!--[--><!--[--><li class="page-catalog-menu-depth_2"><a aria-current="page" href="/docs/Rests-docs/BatJiaoBen.html#bat-命令" class="router-link-active router-link-exact-active link page-catalog-item" aria-label=".bat 命令"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->.bat 命令<!--]--></span></span><!--[--><!--]--></a></li><!--[--><li class="page-catalog-menu-depth_3"><a aria-current="page" href="/docs/Rests-docs/BatJiaoBen.html#基础命令" class="router-link-active router-link-exact-active link page-catalog-item" aria-label="基础命令"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->基础命令<!--]--></span></span><!--[--><!--]--></a></li><!--]--><!--[--><li class="page-catalog-menu-depth_3"><a aria-current="page" href="/docs/Rests-docs/BatJiaoBen.html#常用命令" class="router-link-active router-link-exact-active link page-catalog-item" aria-label="常用命令"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->常用命令<!--]--></span></span><!--[--><!--]--></a></li><!--]--><!--]--><!--[--><li class="page-catalog-menu-depth_2"><a aria-current="page" href="/docs/Rests-docs/BatJiaoBen.html#bat-避坑指南" class="router-link-active router-link-exact-active link page-catalog-item" aria-label="Bat 避坑指南"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->Bat 避坑指南<!--]--></span></span><!--[--><!--]--></a></li><!--[--><li class="page-catalog-menu-depth_3"><a aria-current="page" href="/docs/Rests-docs/BatJiaoBen.html#cmd-窗口中文乱码" class="router-link-active router-link-exact-active link page-catalog-item" aria-label="Cmd 窗口中文乱码"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->Cmd 窗口中文乱码<!--]--></span></span><!--[--><!--]--></a></li><!--]--><!--]--><!--[--><li class="page-catalog-menu-depth_2"><a aria-current="page" href="/docs/Rests-docs/BatJiaoBen.html#批量生成-angular-组件" class="router-link-active router-link-exact-active link page-catalog-item" aria-label="批量生成 Angular 组件"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->批量生成 Angular 组件<!--]--></span></span><!--[--><!--]--></a></li><!--[--><li class="page-catalog-menu-depth_3"><a aria-current="page" href="/docs/Rests-docs/BatJiaoBen.html#安装-angular-框架" class="router-link-active router-link-exact-active link page-catalog-item" aria-label="安装 Angular 框架"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->安装 Angular 框架<!--]--></span></span><!--[--><!--]--></a></li><!--]--><!--[--><li class="page-catalog-menu-depth_3"><a aria-current="page" href="/docs/Rests-docs/BatJiaoBen.html#编写-bat-脚本" class="router-link-active router-link-exact-active link page-catalog-item" aria-label="编写 .bat 脚本"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->编写 .bat 脚本<!--]--></span></span><!--[--><!--]--></a></li><!--]--><!--]--><!--[--><li class="page-catalog-menu-depth_2"><a aria-current="page" href="/docs/Rests-docs/BatJiaoBen.html#一键提交git" class="router-link-active router-link-exact-active link page-catalog-item" aria-label="一键提交Git"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->一键提交Git<!--]--></span></span><!--[--><!--]--></a></li><!--]--><!--[--><li class="page-catalog-menu-depth_2"><a aria-current="page" href="/docs/Rests-docs/BatJiaoBen.html#一键提交-网站-git-脚本" class="router-link-active router-link-exact-active link page-catalog-item" aria-label="一键提交 网站 Git 脚本"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->一键提交 网站 Git 脚本<!--]--></span></span><!--[--><!--]--></a></li><!--[--><li class="page-catalog-menu-depth_3"><a aria-current="page" href="/docs/Rests-docs/BatJiaoBen.html#基础版" class="router-link-active router-link-exact-active link page-catalog-item" aria-label="基础版"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->基础版<!--]--></span></span><!--[--><!--]--></a></li><!--]--><!--[--><li class="page-catalog-menu-depth_3"><a aria-current="page" href="/docs/Rests-docs/BatJiaoBen.html#修改版-自动拷贝" class="router-link-active router-link-exact-active link page-catalog-item" aria-label="修改版 自动拷贝"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->修改版 自动拷贝<!--]--></span></span><!--[--><!--]--></a></li><!--]--><!--[--><li class="page-catalog-menu-depth_3"><a aria-current="page" href="/docs/Rests-docs/BatJiaoBen.html#打包-github-3-0-版" class="router-link-active router-link-exact-active link page-catalog-item" aria-label="打包 GitHub 3.0 版"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->打包 GitHub 3.0 版<!--]--></span></span><!--[--><!--]--></a></li><!--]--><!--]--><!--[--><li class="page-catalog-menu-depth_2"><a aria-current="page" href="/docs/Rests-docs/BatJiaoBen.html#一键关闭端口" class="router-link-active router-link-exact-active link page-catalog-item" aria-label="一键关闭端口"><!--[--><!--]--><span class="xicon-container left"><!--[--><!----><!--]--><span class="xicon-content" style="color:inherit;font-size:14px;"><!--[-->一键关闭端口<!--]--></span></span><!--[--><!--]--></a></li><!--]--><!--]--></ul></div></div></div></div><!----><!----><!--]--></div>
    <script type="module" src="/assets/app-8a43a0f0.js" defer></script>
  </body>
</html>
